import http from "@/common/http/request";
import {
  musicIosVersionRecordListInterface,
  musicIosVersionRecordAddInterface,
  musicIosVersionRecordUpdateInterface,
} from "./versionRecord.interface";
// ios版本记录列表
export const $musicIosVersionRecordList = (data: musicIosVersionRecordListInterface) => {
  const $http = new http();
  return $http.get({
    url: '/music/ios/versionRecord/list',
    data,
  })
}
// ios版本记录详情
export const $musicIosVersionRecordDetail = (id: string) => {
  const $http = new http();
  return $http.get({
    url: `/music/ios/versionRecord/${id}`,
  })
}
// 新增ios版本记录
export const $musicIosVersionRecordAdd = (data: musicIosVersionRecordAddInterface) => {
  const $http = new http();
  return $http.post({
    url: '/music/ios/versionRecord',
    data,
  })
}
// 修改apk版本记录
export const $musicIosVersionRecordUpdate = (data: musicIosVersionRecordUpdateInterface) => {
  const $http = new http();
  return $http.put({
    url: '/music/ios/versionRecord',
    data,
  })
}
// 删除apk版本记录
export const $musicIosVersionRecordDelete = (data: Array<string>) => {
  const $http = new http();
  return $http.delete({
    url: `/music/ios/versionRecord/${data.join(',')}`,
  })
}
// ios版本审核通过
export const $musicIosVersionRecordPass = (id: string) => {
  const $http = new http();
  return $http.post({
    url: '/music/ios/versionRecord/pass',
    data: { id },
  })
}